package io.xccit.pojo.impl;

import io.xccit.pojo.Calculator;

/**
 * @author Xccit
 * @Date 2023-01-29
 * @Description 未加入代理模式的实现类
 */
public class CalculatorImpl implements Calculator {
    @Override
    public int add(int i, int j) {
//        System.out.println("方法add(),"+"参数:"+i+":"+j);
        int result = i + j;
        System.out.println("方法内部结果:"+result);
//        System.out.println("结果:"+result);
        return result;
    }

    @Override
    public int sub(int i, int j) {
//        System.out.println("方法sub(),"+"参数:"+i+":"+j);
        int result = i - j;
        System.out.println("方法内部结果:"+result);
//        System.out.println("结果:"+result);
        return result;
    }

    @Override
    public int mul(int i, int j) {
//        System.out.println("方法mul(),"+"参数:"+i+":"+j);
        int result = i * j;
        System.out.println("方法内部结果:"+result);
//        System.out.println("结果:"+result);
        return result;
    }

    @Override
    public int div(int i, int j) {
//        System.out.println("方法div(),"+"参数:"+i+":"+j);
        int result = i / j;
        System.out.println("方法内部结果:"+result);
//        System.out.println("结果:"+result);
        return result;
    }
}
